<?php
/** @var Controller $this */
/** @var DatosAntropomorficos $model */
?>

<?php
Util::tsRegisterAssetJs("reports.js");
$form = $this->beginWidget('zii.widgets.CPortlet', array(
    'title' => 'Reportes Sobre Datos Antropométricos',
    'id' => 'reporteIMCForm',
        ));
?>

<div class="box-header well" data-original-title> 
    <center>
        <?php
        $this->widget('bootstrap.widgets.TbButton', array(
            'type' => 'info',
            'icon' => 'icon-th-list',
            'label' => Yii::t('AweCrud.app', 'Regresar a Administrar Infantes'),
            'url' => '../ninios/admin',
        ));
        ?>
        <?php
        $this->widget('bootstrap.widgets.TbButton', array(
            'type' => 'warning',
            'icon' => 'icon-file',
            'label' => Yii::t('AweCrud.app', 'Exportar todas las curvas (imagen)'),
            'htmlOptions' => array('onclick' => 'js:Highcharts.exportCharts([chart1,chart2,chart3])'),
        ));
        ?>
        <?php
        $this->widget('bootstrap.widgets.TbButton', array(
            'type' => 'success',
            'icon' => 'print',
            'label' => Yii::t('AweCrud.app', 'Imprimir  todas las curvas'),
            'htmlOptions' => array('onclick' => 'js:printCharts([chart1,chart2,chart3])'),
        ));
        ?>
        <?php
        $this->widget('bootstrap.widgets.TbButton', array(
            'type' => 'inverse',
            'icon' => 'print',
            'label' => Yii::t('AweCrud.app', 'Exportar Histórico'),
//            'target'=>'_blank',
            'url'=>Yii::app()->createUrl("/ninio/datosAntropomorficos/exportMedidasPdf", array("id" => $ninio->id)),
            'htmlOptions' => array( 'target'=>'_blank'),
        ));
        ?>
    </center>
</div>


<div class="row-fluid">
    <div class="well">

        <?php
        $this->renderPartial('/../views/ninios/reports/_tablaDatos', array('datosTabla' => $datosTabla, 'ninio' => $ninio));
        ?>
    </div>
    <div class="well">

        <?php
        $this->renderPartial('/../views/ninios/reports/_reporte', array('reporte' => $report, 'nombreChart' => 'chart1', 'ninio' => $ninio));
        ?>
    </div>
    <div class="well">

        <?php
        $this->renderPartial('/../views/ninios/reports/_reporteTalla', array('reporte' => $reportTalla, 'nombreChart' => 'chart2', 'ninio' => $ninio));
        ?>
    </div>
    <div class="well">

        <?php
        $this->renderPartial('/../views/ninios/reports/_reportePeso', array('reporte' => $reportPeso, 'nombreChart' => 'chart3', 'ninio' => $ninio));
        ?>
    </div>
</div>
<?php $this->endWidget(); ?>


